use macros::base_model;
use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};

#[base_model]
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)]
#[sea_orm(table_name = "system", comment = "系统参数配置表")]
pub struct Model {
    #[sea_orm(column_type = "Text", nullable, comment = "light|dark")]
    pub theme: Option<String>,

    #[sea_orm(column_type = "Text", nullable, comment = "当前登录用户 UUID")] // 用户ID，允许为空
    pub user_id: Option<String>,

    #[sea_orm(column_type = "Json", nullable, comment = "其他配置杂项")]
    // 配置信息，存储为文本 (例如 JSON)，允许为空
    pub configs: Option<String>,
}

#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {}
